package com.huang.A01_object;

public class Student {
    String name;
    double chinese;
    double english;
    double score;

    public void pass(double score){
        if(this.score > score){
            System.out.println("恭喜您，考试通过");
        }else{
            System.out.println("不及格");
        }
    }

    public void totalScore() {
        System.out.println(name + "总成绩为：" + (chinese + english));
    }

    public void averageScore() {
        System.out.println(name + "平均成绩为：" + (chinese + english) / 2);
    }
}
//一个代码文件中，可以写多个class类，但只能有一个用public修饰，
//且public修饰的类名必须成为代码文件名
class Person {

}

/*public class Car {

}*/